import {createRouter, createWebHistory} from 'vue-router'
import Introduce from '@/views/Introduce.vue'

const routes =  [
        {
            path: '/',
            name: 'home',
            component: import("@/views/Home/HomeView.vue")
        },
        {
            path: '/login',
            name: 'login',
            component:  import('@/views/Login.vue')
        },
        {
            path: '/users',
            name: 'users',
            component:  import('@/views/Manager/User/UserListView.vue'),
            children: [

            ]
        },
        {
            path: '/category',
            name: 'category',
            component:  import('@/views/System/CategoryManagerView.vue'),
            children: [

            ]
        },
        {
            path: '/money',
            name: 'money',
            component:  import('@/views/System/MoneyManagerView.vue'),
            children: [

            ]
        },
        {
            path: '/style',
            name: 'style',
            component:  import('@/views/System/StyleManagerView.vue'),
            children: [

            ]
        },
        {
            path: '/messages',
            name: 'messages',
            component:  import('@/views/Manager/MessageView.vue'),
            children: [

            ]
        },
        {
            path: "/detail/:id",
            name: "detail",
            component:  import("@/views/Manager/User/UserDetailView.vue")
        },
        {
            path: '/merchants',
            name: 'merchants',
            component:  import('@/views/Manager/Merchant/MerchantListView.vue'),
            children: [

            ]
        },
        {
            path: '/merchantsDetail/:id',
            name: 'merchantsDetail',
            component:  import('@/views/Manager/Merchant/MerchantDetailView.vue'),
        },
        {
            path: '/orders',
            name: 'orders',
            component:  import('@/views/Manager/Order/OrderListView.vue'),
            children: [

            ]
        },
        {
            path: '/ordersDetail/:id',
            name: 'ordersDetail',
            component:  import('@/views/Manager/Order/OrderDetailView.vue'),
            children: [

            ]
        },
        {
            path: '/dishes',
            name: 'dishes',
            component:  import('@/views/Manager/Dish/DishListView.vue'),
            children: [

            ]
        },
        {
            path: '/dishesDetail/:id',
            name: 'dishesDetail',
            component:  import('@/views/Manager/Dish/DishDetailView.vue'),
            children: [

            ]
        },
        {
            path: '/account',
            name: 'account',
            component:  import('@/views/Admin/AdminUserInfo.vue'),
            children: [

            ]
        },
        {
            path: '/invite',
            name: 'invite',
            component:  import('@/views/Admin/InviteAdminView.vue'),
            children: [

            ]
        },
    ]

const router = createRouter({
    mode: 'history',
    history: createWebHistory(),
    routes,

})

export default router
